This is a brief workflow highlighting the exploratory analysis of survey data mined to assist in the writing of the manuscript, “Gender Disparities Persist in Endoscopy Suite” (Rabinowitz, et al.). Where appropriate, samples of the exact R syntax used will be displayed, along with the corresponding output (tabular data, graphical plots, maps, etc.).
require(broom)
require(dplyr)
SURVEY <-
GENDER_DIFF_DATA_LABELS %>%
filter( COMPLETE != "Incomplete" &
BIRTHSEX != "OTHER" &
!is.na(BIRTHSEX) ) %>%
select( BIRTHSEX, RACE_SOUTHASIAN:RACE_OTHER, AGE, TRAINING_LEVEL, HEIGHT, GLOVE, GLOVE_SIZE_AVAILABLE, PERFORMANCE_HOURS, TEACHER_GENDER_PREFERENCE,
FEMALE_TRAINERS, MALE_TRAINERS, EVER_INJURED, EXPERIENCED_TRANSIENT_PAIN_NO, EXPERIENCED_TRANSIENT_PAIN_HAND, EXPERIENCED_TRANSIENT_PAIN_NECK_SHOULDER,
EXPERIENCED_TRANSIENT_PAIN_BACK, EXPERIENCED_TRANSIENT_PAIN_LEG, EXPERIENCED_TRANSIENT_PAIN_FOOT, GROWING_PAINS,
FELLOWSHIP_FORMAL_ERGO_TRAINING, INFORMAL_TRAINING, TRAINING_TECHNIQUES_POSTURAL, TRAINING_TECHNIQUES_BEDHEIGHT, TRAINING_TECHNIQUES_BEDANGLE,
TRAINING_TECHNIQUES_MONITORHEIGHT, TRAINING_TECHNIQUES_MUSCULOSKELETAL, TRAINING_TECHNIQUES_EXERCISE_STRETCHING, TRAINING_TECHNIQUES_DIAL_EXTENDERS,
TRAINING_TECHNIQUES_PEDIATRIC_COLONOSCOPE, ERGO_TRAINING_BUDGET, ERGO_FEEDBACK, ERGO_FEEDBACK_BY_WHOM, ERGO_OPTIMIZATION, GLOVE_SIZE_AVAILABLE,
DIAL_EXTENDERS_AVAILABLE, DIAL_EXTENDERS_ENCOURAGED, DIAL_EXTENDERS_FEMALEATT, DIAL_EXTENDERS_MALEATT, PEDI_COLONOSCOPES_AVAILABLE,
LEAD_APRONS_DONTKNOW, LEAD_APRONS_LW_ONEPIECE, LEAD_APRONS_LW_TWOPIECE, LEAD_APRONS_STANDARD_ONEPIECE, LEAD_APRONS_STANDARD_TWOPIECE,
LEAD_APRONS_DOUBLE, LEAD_APRONS_THYROID, LEAD_APRONS_MATERNALDOS, LEAD_APRONS_FETALDOS,
ERGO_FORMAL_TIMEOUT_PRIOR, ERGO_INFORMAL_TIMEOUT_PRIOR, MONITORS_ADJUSTABLE, TEACHER_SENSITIVITY_STATURE_HANDSIZE,
TEACHER_SENSITIVITY_BY_GENDER, TACTILE_INSTRUCTION_FROM_MALES, TACTILE_INSTRUCTION_FROM_FEMALES,
COMFORTABLE_ASKING_NURSES, ASK_NURSES_ONCE, ASK_NURSES_TWICE, ASK_NURSES_MORE,
COMFORTABLE_ASKING_TECHS, MALE_ATTENDINGS_ASKING, FEMALE_ATTENDINGS_ASKING,
RECOGNIZED_RESPECTED_ES_STAFF, RECOGNIZED_RESPECTED_ANESTHETISTS, RECOGNIZED_RESPECTED_GASTRO_ATTENDING, FIRST_NAME_NO_PERMISSION,
ERGO_TRAINING_MANDATORY, ERGO_OPTIMIZAITON_BUDGET_REQUIRED, EXPERIENCE_IMPROVED_DIAL_EXTENDERS, EXPERIENCE_IMPROVED_PEDI_COLONOSCOPES, EXPERIENCE_IMPROVED_APRONS,
ENDO_TEACHERS_FORMAL_TRAINING_REQUIRED,
ERGONOMIC_IMPORTANCE, MITIGATING_MUSCLE_STRAIN, BED_POSITION, ENDO_TRAINER_POSITION, WHEN_DISABILITY_INSURANCE) %>%
mutate(AGE2 = ifelse( AGE %in% c('< 30', '30-34', '35-40'), AGE, '> 40' )) %>%
mutate( RACE = ifelse( RACE_HISPANIC == "Y", "HISPANIC",
ifelse( RACE_WHITE == "Y", "WHITE",
ifelse( RACE_BLACK == "Y", "BLACK",
ifelse (RACE_SOUTHASIAN == "Y", "ASIAN SOUTH",
ifelse (RACE_EASTASIAN == "Y", "ASIAN EAST",
ifelse (RACE_NATIVEAMER == "Y", "OTHER",
ifelse (RACE_PACIFICISLAND == "Y", "OTHER",
ifelse (RACE_OTHER == "Y", "OTHER", "OTHER" )))))))),
RACE = factor(RACE, levels= c('ASIAN EAST', 'ASIAN SOUTH', 'BLACK', 'HISPANIC', 'WHITE', 'OTHER'))) %>%
mutate( BIRTHSEX = factor( BIRTHSEX, levels= c("F","M") )) %>%
mutate (AGE2 = factor(AGE2, levels = c('< 30', '30-34', '35-40', '> 40'))) %>%
mutate (RACE2 = case_when( RACE != "WHITE" ~ 'NON-WHITE',
TRUE ~ 'WHITE'),
RACE2 = factor(RACE2, levels = c("WHITE", "NON-WHITE"))) %>%
mutate( TRAINING_LEVEL = factor (TRAINING_LEVEL, levels= c('First year fellow','Second year fellow', 'Third year fellow', 'Advanced fellow'))) %>%
mutate( TRAINING_LEVEL = recode_factor( TRAINING_LEVEL, 'First year fellow'= 'First Year',
'Second year fellow'= 'Second Year',
'Third year fellow' = 'Third Year',
'Advanced fellow' = "Avanced", .ordered = T) ) %>%
mutate( HEIGHT2 = factor(HEIGHT, levels= c("< 5'", "5-5'3", "5'4-5'6", "5'7-5'9", "5'10-6'", "6'1-6'4", "> 6'4"))) %>%
mutate( PERFORMANCE_HOURS = factor(PERFORMANCE_HOURS),
PERFORMANCE_HOURS = recode_factor(PERFORMANCE_HOURS, "< 10" = "< 10",
"10-20" = "10-20",
"21-30" = "21-30",
"31-40" = "31-40",
.default = "> 40")) %>%
mutate(TEACHER_GENDER_PREFERENCE = factor(TEACHER_GENDER_PREFERENCE),
TEACHER_GENDER_PREFERENCE = recode_factor(TEACHER_GENDER_PREFERENCE, "Yes" = "Yes",
.default = "No")) %>%
mutate( FEMALE_TRAINERS = factor(FEMALE_TRAINERS),
FEMALE_TRAINERS = recode_factor(FEMALE_TRAINERS, 'None' = 'None',
'1-2' = '1-2',
'3-5' = '3-5',
'6-10' = '6-10',
'> 10' = '> 10' )) %>%
mutate( MALE_TRAINERS = factor(MALE_TRAINERS),
MALE_TRAINERS = recode_factor(MALE_TRAINERS, 'None' = 'None',
'1-2' = '1-2',
'3-5' = '3-5',
'6-10' = '6-10',
'> 10' = '> 10' )) %>%
mutate( EVER_INJURED = factor(EVER_INJURED)) %>%
mutate( EXPERIENCED_TRANSIENT_PAIN_NO = factor(EXPERIENCED_TRANSIENT_PAIN_NO)) %>%
mutate( EXPERIENCED_TRANSIENT_PAIN_HAND = factor(EXPERIENCED_TRANSIENT_PAIN_HAND)) %>%
mutate( EXPERIENCED_TRANSIENT_PAIN_NECK_SHOULDER = factor(EXPERIENCED_TRANSIENT_PAIN_NECK_SHOULDER)) %>%
mutate( EXPERIENCED_TRANSIENT_PAIN_BACK = factor(EXPERIENCED_TRANSIENT_PAIN_BACK)) %>%
mutate( EXPERIENCED_TRANSIENT_PAIN_LEG = factor(EXPERIENCED_TRANSIENT_PAIN_LEG)) %>%
mutate( EXPERIENCED_TRANSIENT_PAIN_FOOT = factor(EXPERIENCED_TRANSIENT_PAIN_FOOT)) %>%
mutate( GROWING_PAINS = factor(GROWING_PAINS)) %>%
mutate( FELLOWSHIP_FORMAL_ERGO_TRAINING = factor(FELLOWSHIP_FORMAL_ERGO_TRAINING)) %>%
mutate( INFORMAL_TRAINING = factor(INFORMAL_TRAINING)) %>%
mutate( TRAINING_TECHNIQUES_POSTURAL = factor(TRAINING_TECHNIQUES_POSTURAL)) %>%
mutate( TRAINING_TECHNIQUES_BEDHEIGHT = factor(TRAINING_TECHNIQUES_BEDHEIGHT)) %>%
mutate( TRAINING_TECHNIQUES_BEDANGLE = factor(TRAINING_TECHNIQUES_BEDANGLE)) %>%
mutate( TRAINING_TECHNIQUES_MONITORHEIGHT = factor(TRAINING_TECHNIQUES_MONITORHEIGHT)) %>%
mutate( TRAINING_TECHNIQUES_MUSCULOSKELETAL = factor(TRAINING_TECHNIQUES_MUSCULOSKELETAL)) %>%
mutate( TRAINING_TECHNIQUES_EXERCISE_STRETCHING = factor(TRAINING_TECHNIQUES_EXERCISE_STRETCHING)) %>%
mutate( TRAINING_TECHNIQUES_DIAL_EXTENDERS = factor(TRAINING_TECHNIQUES_DIAL_EXTENDERS)) %>%
mutate( TRAINING_TECHNIQUES_PEDIATRIC_COLONOSCOPE = factor(TRAINING_TECHNIQUES_PEDIATRIC_COLONOSCOPE)) %>%
mutate( ERGO_TRAINING_BUDGET = factor(ERGO_TRAINING_BUDGET),
ERGO_TRAINING_BUDGET = recode_factor(ERGO_TRAINING_BUDGET, 'Yes' = 'Y',
'No' = 'N',
"Don't know" = 'DK', .ordered= T)) %>%
mutate( ERGO_FEEDBACK = factor(ERGO_FEEDBACK),
ERGO_FEEDBACK = recode_factor(ERGO_FEEDBACK, 'Never' = 'Never',
'Rarely' = 'Rarely',
'Sometimes' = 'Sometimes',
'Often' = 'Often', .ordered = T )) %>%
mutate( ERGO_FEEDBACK_BY_WHOM = factor(ERGO_FEEDBACK_BY_WHOM),
ERGO_FEEDBACK_BY_WHOM = recode_factor(ERGO_FEEDBACK_BY_WHOM, 'I do not or rarely receive ergonomic feedback' = "Do not/rarely received feedback",
'Mostly male endoscopy teachers' = 'Mostly male teachers',
'Mostly female endoscopy teachers' = 'Mostly female teachers',
'Both male and female endoscopy teachers equally' = 'Both equally' , .ordered = T)) %>%
mutate( ERGO_OPTIMIZATION = factor(ERGO_OPTIMIZATION),
ERGO_OPTIMIZATION = recode_factor(ERGO_OPTIMIZATION, 'Y' = 'Y',
'N' = 'N',
"Don't know" = 'DK', .ordered= T)) %>%
mutate( GLOVE_SIZE_AVAILABLE = factor(GLOVE_SIZE_AVAILABLE)) %>%
mutate( DIAL_EXTENDERS_AVAILABLE = factor(DIAL_EXTENDERS_AVAILABLE),
DIAL_EXTENDERS_AVAILABLE = recode_factor(DIAL_EXTENDERS_AVAILABLE, 'Y' = 'Y',
'N' = 'N',
"Don't know" = 'DK', .ordered= T)) %>%
mutate( DIAL_EXTENDERS_ENCOURAGED = factor(DIAL_EXTENDERS_ENCOURAGED),
DIAL_EXTENDERS_ENCOURAGED = recode_factor(DIAL_EXTENDERS_ENCOURAGED, 'Y' = 'Y',
'N' = 'N',
"Don't use" = 'DU', .ordered= T)) %>%
mutate( DIAL_EXTENDERS_FEMALEATT = factor(DIAL_EXTENDERS_FEMALEATT),
DIAL_EXTENDERS_FEMALEATT = recode_factor(DIAL_EXTENDERS_FEMALEATT, 'Not Likely' = 'Not Likely',
'Somewhat Likely' = 'Somewhat Likely',
'Sometimes' = 'Sometimes',
'Verly Likely' = 'Very Likely',
'NA' = 'NA', .ordered = T )) %>%
mutate( DIAL_EXTENDERS_MALEATT = factor(DIAL_EXTENDERS_MALEATT),
DIAL_EXTENDERS_MALEATT = recode_factor(DIAL_EXTENDERS_MALEATT, 'Not Likely' = 'Not Likely',
'Somewhat Likely' = 'Somewhat Likely',
'Sometimes' = 'Sometimes',
'Verly Likely' = 'Very Likely',
'NA' = 'NA', .ordered = T )) %>%
mutate( PEDI_COLONOSCOPES_AVAILABLE = factor(PEDI_COLONOSCOPES_AVAILABLE),
PEDI_COLONOSCOPES_AVAILABLE = recode_factor(PEDI_COLONOSCOPES_AVAILABLE, 'Y' = 'Y',
'N' = 'N',
"Don't know" = 'DK', .ordered= T)) %>%
mutate( LEAD_APRONS_DONTKNOW = factor(LEAD_APRONS_DONTKNOW),
LEAD_APRONS_DONTKNOW = recode_factor(LEAD_APRONS_DONTKNOW, 'N' = 'Aware',
'Y' = 'Not Aware',.ordered= T)) %>%
mutate( TEACHER_SENSITIVITY_BY_GENDER = factor(TEACHER_SENSITIVITY_BY_GENDER),
TEACHER_SENSITIVITY_BY_GENDER = recode_factor(TEACHER_SENSITIVITY_BY_GENDER, 'Male' = 'Male',
'Female' = 'Female',
'Both equally' = 'Both Equally',
'I have not had female endoscopy teachers' = 'Never had female teacher',
'Not sure' = 'Not Sure', .ordered= T )) %>%
mutate( TACTILE_INSTRUCTION_FROM_MALES = factor(TACTILE_INSTRUCTION_FROM_MALES),
TACTILE_INSTRUCTION_FROM_MALES = recode_factor(TACTILE_INSTRUCTION_FROM_MALES, 'No' = 'No',
'Yes, rarely' = 'Rarely',
'Yes, often' = 'Often', .ordered= T)) %>%
mutate( TACTILE_INSTRUCTION_FROM_FEMALES = factor(TACTILE_INSTRUCTION_FROM_FEMALES),
TACTILE_INSTRUCTION_FROM_FEMALES = recode_factor(TACTILE_INSTRUCTION_FROM_FEMALES, 'No' = 'No',
'Yes, rarely' = 'Rarely',
'Yes, often' = 'Often', .ordered= T)) %>%
mutate( NURSES_ASKING = ifelse( ASK_NURSES_MORE == "Y", "More than Twice",
ifelse( ASK_NURSES_TWICE == "Y", "Twice",
ifelse( ASK_NURSES_ONCE == "Y", "Once", NA))),
NURSES_ASKING = factor(NURSES_ASKING),
NURSES_ASKING = recode_factor(NURSES_ASKING, "Once" = "Once",
"Twice" = "Twice",
"More than Twicce" = "More than Twice", .ordered=T),
MALE_ATTENDINGS_ASKING = factor(MALE_ATTENDINGS_ASKING),
MALE_ATTENDINGS_ASKING = recode_factor(MALE_ATTENDINGS_ASKING, "Once" = "Once",
"Twice" = "Twice",
"More than Twice" = "More than Twice", .ordered=T),
FEMALE_ATTENDINGS_ASKING = factor(FEMALE_ATTENDINGS_ASKING),
FEMALE_ATTENDINGS_ASKING = recode_factor(FEMALE_ATTENDINGS_ASKING, "Once" = "Once",
"Twice" = "Twice",
"More than twice" = "More than Twice",
"Not applicable, I do not work with any female attendings" = "Don't work with FemAtt", .ordered=T)) %>%
mutate( ERGO_TRAINING_MANDATORY = factor(ERGO_TRAINING_MANDATORY),
ERGO_TRAINING_MANDATORY = recode_factor(ERGO_TRAINING_MANDATORY, 'Y' = 'Y',
'N' = 'N',
"Don't know" = 'DK', .ordered= T) ,
ERGO_OPTIMIZAITON_BUDGET_REQUIRED = factor(ERGO_OPTIMIZAITON_BUDGET_REQUIRED),
ERGO_OPTIMIZAITON_BUDGET_REQUIRED = recode_factor(ERGO_OPTIMIZAITON_BUDGET_REQUIRED, 'Y' = 'Y',
'N' = 'N',
"Don't know" = 'DK', .ordered= T),
EXPERIENCE_IMPROVED_DIAL_EXTENDERS = factor(EXPERIENCE_IMPROVED_DIAL_EXTENDERS),
EXPERIENCE_IMPROVED_DIAL_EXTENDERS = recode_factor(EXPERIENCE_IMPROVED_DIAL_EXTENDERS, 'Y' = 'Y',
'N' = 'N',
"Don't know" = 'DK', .ordered= T),
EXPERIENCE_IMPROVED_PEDI_COLONOSCOPES = factor(EXPERIENCE_IMPROVED_PEDI_COLONOSCOPES),
EXPERIENCE_IMPROVED_PEDI_COLONOSCOPES = recode_factor(EXPERIENCE_IMPROVED_PEDI_COLONOSCOPES, 'Y' = 'Y',
'N' = 'N',
"Don't know" = 'DK', .ordered= T) ,
EXPERIENCE_IMPROVED_APRONS = factor(EXPERIENCE_IMPROVED_APRONS),
EXPERIENCE_IMPROVED_APRONS = recode_factor(EXPERIENCE_IMPROVED_APRONS, 'Y' = 'Y',
'N' = 'N',
"Don't know" = 'DK', .ordered= T),
ENDO_TEACHERS_FORMAL_TRAINING_REQUIRED = factor(ENDO_TEACHERS_FORMAL_TRAINING_REQUIRED),
ENDO_TEACHERS_FORMAL_TRAINING_REQUIRED = recode_factor(ENDO_TEACHERS_FORMAL_TRAINING_REQUIRED, 'Y' = 'Y',
'N' = 'N',
"Don't know" = 'DK', .ordered= T)) %>%
mutate( ERGONOMIC_IMPORTANCE = factor(ERGONOMIC_IMPORTANCE),
ERGONOMIC_IMPORTANCE = recode_factor(ERGONOMIC_IMPORTANCE, 'Both A and C' = 'Correct',
.default = 'Incorrect', .ordered= T) ,
MITIGATING_MUSCLE_STRAIN = factor(MITIGATING_MUSCLE_STRAIN),
MITIGATING_MUSCLE_STRAIN = recode_factor(MITIGATING_MUSCLE_STRAIN, 'All of the above' = 'Correct',
.default = 'Incorrect', .ordered= T) ,
BED_POSITION = factor(BED_POSITION),
BED_POSITION = recode_factor(BED_POSITION, '10 cm below elbow height' = 'Correct',
.default = 'Incorrect', .ordered= T) ,
ENDO_TRAINER_POSITION = factor(ENDO_TRAINER_POSITION),
ENDO_TRAINER_POSITION = recode_factor(ENDO_TRAINER_POSITION, 'At the foot of the bed, on the same side of the trainee.' = 'Correct',
.default = 'Incorrect', .ordered= T) ,
WHEN_DISABILITY_INSURANCE = factor(WHEN_DISABILITY_INSURANCE),
WHEN_DISABILITY_INSURANCE = recode_factor(WHEN_DISABILITY_INSURANCE, 'During training' = 'Correct',
.default = 'Incorrect', .ordered= T) )
Here’s a glimpse of the structure of the resulting dataset
SURVEY:
glimpse(SURVEY)
## Rows: 200
## Columns: 88
## $ BIRTHSEX <fct> F, F, F, M, F, F, F, F, F, M…
## $ RACE_SOUTHASIAN <chr> "N", "N", "N", "Y", "N", "N"…
## $ RACE_EASTASIAN <chr> "N", "N", "N", "N", "Y", "Y"…
## $ RACE_WHITE <chr> "N", "Y", "Y", "N", "N", "N"…
## $ RACE_BLACK <chr> "N", "N", "N", "N", "N", "N"…
## $ RACE_HISPANIC <chr> "Y", "N", "N", "N", "N", "N"…
## $ RACE_NATIVEAMER <chr> "N", "N", "N", "N", "N", "N"…
## $ RACE_PACIFICISLAND <chr> "N", "N", "N", "N", "N", "N"…
## $ RACE_OTHER <chr> "N", "N", "N", "N", "N", "N"…
## $ AGE <chr> "30-34", "30-34", "30-34", "…
## $ TRAINING_LEVEL <ord> Third Year, Third Year, Firs…
## $ HEIGHT <chr> "5'4-5'6", "5'4-5'6", "5'4-5…
## $ GLOVE <dbl> 6.5, 6.5, 6.0, 7.0, 6.5, 5.5…
## $ GLOVE_SIZE_AVAILABLE <fct> Y, Y, Y, Y, N, N, Y, Y, N, Y…
## $ PERFORMANCE_HOURS <fct> 10-20, < 10, 10-20, 31-40, 1…
## $ TEACHER_GENDER_PREFERENCE <fct> No, No, Yes, No, No, No, No,…
## $ FEMALE_TRAINERS <fct> None, 6-10, 6-10, 6-10, 6-10…
## $ MALE_TRAINERS <fct> 6-10, > 10, > 10, > 10, > 10…
## $ EVER_INJURED <fct> N, N, N, N, Y, N, N, N, N, N…
## $ EXPERIENCED_TRANSIENT_PAIN_NO <fct> Y, N, N, N, N, N, N, N, N, N…
## $ EXPERIENCED_TRANSIENT_PAIN_HAND <fct> N, Y, Y, Y, Y, Y, Y, N, N, Y…
## $ EXPERIENCED_TRANSIENT_PAIN_NECK_SHOULDER <fct> N, Y, Y, Y, Y, N, Y, Y, Y, Y…
## $ EXPERIENCED_TRANSIENT_PAIN_BACK <fct> N, Y, Y, Y, Y, N, Y, N, N, Y…
## $ EXPERIENCED_TRANSIENT_PAIN_LEG <fct> N, N, Y, Y, N, N, N, N, N, N…
## $ EXPERIENCED_TRANSIENT_PAIN_FOOT <fct> N, N, Y, Y, N, Y, N, N, N, N…
## $ GROWING_PAINS <fct> NA, Y, Y, Y, Y, N, N, Y, N, …
## $ FELLOWSHIP_FORMAL_ERGO_TRAINING <fct> N, N, N, N, N, N, N, Y, N, Y…
## $ INFORMAL_TRAINING <fct> Y, Y, Y, Y, Y, Y, N, Y, Y, Y…
## $ TRAINING_TECHNIQUES_POSTURAL <fct> Y, N, Y, Y, N, Y, Y, Y, N, Y…
## $ TRAINING_TECHNIQUES_BEDHEIGHT <fct> Y, Y, Y, Y, Y, Y, Y, Y, Y, Y…
## $ TRAINING_TECHNIQUES_BEDANGLE <fct> Y, N, Y, Y, N, Y, Y, N, Y, Y…
## $ TRAINING_TECHNIQUES_MONITORHEIGHT <fct> Y, N, N, Y, N, Y, Y, N, Y, Y…
## $ TRAINING_TECHNIQUES_MUSCULOSKELETAL <fct> Y, N, N, Y, N, N, N, Y, Y, N…
## $ TRAINING_TECHNIQUES_EXERCISE_STRETCHING <fct> N, N, N, N, N, N, N, N, N, N…
## $ TRAINING_TECHNIQUES_DIAL_EXTENDERS <fct> N, N, Y, N, Y, N, Y, N, N, N…
## $ TRAINING_TECHNIQUES_PEDIATRIC_COLONOSCOPE <fct> Y, N, Y, Y, Y, N, Y, Y, Y, N…
## $ ERGO_TRAINING_BUDGET <ord> DK, N, DK, DK, N, DK, DK, N,…
## $ ERGO_FEEDBACK <ord> Sometimes, Rarely, Sometimes…
## $ ERGO_FEEDBACK_BY_WHOM <ord> Mostly male teachers, Mostly…
## $ ERGO_OPTIMIZATION <ord> DK, N, N, Y, N, N, Y, DK, N,…
## $ DIAL_EXTENDERS_AVAILABLE <ord> DK, N, Y, Y, Y, N, Y, DK, N,…
## $ DIAL_EXTENDERS_ENCOURAGED <ord> DU, N, Y, Y, Y, DU, Y, NA, N…
## $ DIAL_EXTENDERS_FEMALEATT <ord> NA, NA, Not likely, NA, Very…
## $ DIAL_EXTENDERS_MALEATT <ord> NA, NA, Very likely, NA, Ver…
## $ PEDI_COLONOSCOPES_AVAILABLE <ord> Y, Y, Y, Y, Y, Y, Y, Y, Y, Y…
## $ LEAD_APRONS_DONTKNOW <ord> Aware, Aware, Not Aware, Awa…
## $ LEAD_APRONS_LW_ONEPIECE <chr> "N", "N", "N", "Y", "N", "Y"…
## $ LEAD_APRONS_LW_TWOPIECE <chr> "Y", "N", "N", "Y", "N", "Y"…
## $ LEAD_APRONS_STANDARD_ONEPIECE <chr> "N", "Y", "N", "Y", "N", "Y"…
## $ LEAD_APRONS_STANDARD_TWOPIECE <chr> "N", "Y", "N", "Y", "N", "Y"…
## $ LEAD_APRONS_DOUBLE <chr> "N", "N", "N", "N", "N", "N"…
## $ LEAD_APRONS_THYROID <chr> "N", "N", "N", "Y", "N", "N"…
## $ LEAD_APRONS_MATERNALDOS <chr> "N", "N", "N", "N", "N", "N"…
## $ LEAD_APRONS_FETALDOS <chr> "N", "N", "N", "N", "N", "N"…
## $ ERGO_FORMAL_TIMEOUT_PRIOR <chr> "N", "N", "N", "N", "N", "N"…
## $ ERGO_INFORMAL_TIMEOUT_PRIOR <chr> "Y", "N", "Y", "Y", "Y", "Y"…
## $ MONITORS_ADJUSTABLE <chr> "Y", "N", "N", "Y", "N", "Y"…
## $ TEACHER_SENSITIVITY_STATURE_HANDSIZE <chr> "Y", "N", "N", "Y", "N", "N"…
## $ TEACHER_SENSITIVITY_BY_GENDER <ord> Never had female teacher, No…
## $ TACTILE_INSTRUCTION_FROM_MALES <ord> Often, No, No, No, No, No, O…
## $ TACTILE_INSTRUCTION_FROM_FEMALES <ord> No, No, No, Rarely, Rarely, …
## $ COMFORTABLE_ASKING_NURSES <chr> "Y", "Y", "Y", "Y", "Y", "Y"…
## $ ASK_NURSES_ONCE <chr> "Y", "Y", "N", "N", "N", "Y"…
## $ ASK_NURSES_TWICE <chr> "N", "N", "Y", "N", "N", "N"…
## $ ASK_NURSES_MORE <chr> "N", "N", "N", "Y", "Y", "N"…
## $ COMFORTABLE_ASKING_TECHS <chr> "Y", "Y", "Y", "Y", "Y", "Y"…
## $ MALE_ATTENDINGS_ASKING <ord> Once, NA, More than twice, M…
## $ FEMALE_ATTENDINGS_ASKING <ord> Don't work with FemAtt, NA, …
## $ RECOGNIZED_RESPECTED_ES_STAFF <chr> "Y", "Y", "Y", "Y", "Y", "Y"…
## $ RECOGNIZED_RESPECTED_ANESTHETISTS <chr> "Y", "Y", "Y", "Y", "Y", "N"…
## $ RECOGNIZED_RESPECTED_GASTRO_ATTENDING <chr> "Y", "Y", "Y", "Y", "Y", "Y"…
## $ FIRST_NAME_NO_PERMISSION <chr> "N", "Y", "Y", "N", "N", "Y"…
## $ ERGO_TRAINING_MANDATORY <ord> Y, Y, Y, Y, Y, Y, Y, Y, Y, Y…
## $ ERGO_OPTIMIZAITON_BUDGET_REQUIRED <ord> Y, Y, Y, Y, Y, Y, Y, Y, Y, Y…
## $ EXPERIENCE_IMPROVED_DIAL_EXTENDERS <ord> DK, DK, Y, N, Y, Y, Y, DK, Y…
## $ EXPERIENCE_IMPROVED_PEDI_COLONOSCOPES <ord> DK, N, Y, N, Y, Y, Y, N, Y, …
## $ EXPERIENCE_IMPROVED_APRONS <ord> N, Y, Y, N, Y, Y, Y, DK, Y, …
## $ ENDO_TEACHERS_FORMAL_TRAINING_REQUIRED <ord> Y, Y, Y, Y, Y, Y, Y, Y, Y, Y…
## $ ERGONOMIC_IMPORTANCE <ord> Incorrect, Correct, Correct,…
## $ MITIGATING_MUSCLE_STRAIN <ord> Incorrect, Correct, Correct,…
## $ BED_POSITION <ord> Incorrect, Incorrect, Correc…
## $ ENDO_TRAINER_POSITION <ord> Incorrect, Correct, Incorrec…
## $ WHEN_DISABILITY_INSURANCE <ord> Incorrect, Correct, Correct,…
## $ AGE2 <fct> 30-34, 30-34, 30-34, 30-34, …
## $ RACE <fct> HISPANIC, WHITE, WHITE, ASIA…
## $ RACE2 <fct> NON-WHITE, WHITE, WHITE, NON…
## $ HEIGHT2 <fct> 5'4-5'6, 5'4-5'6, 5'4-5'6, 6…
## $ NURSES_ASKING <ord> Once, Once, Twice, More than…
#Chi-Square Test of Proportions
females_males = c(99, 101)
chisq.test(females_males, p= c(1/2, 1/2))
##
## Chi-squared test for given probabilities
##
## data: females_males
## X-squared = 0.02, df = 1, p-value = 0.8875
#SJPlot cross tabulation with Chi-Square/df
plot_xtab(SURVEY$AGE2, SURVEY$BIRTHSEX, margin = "row",
bar.pos = "stack", coord.flip = TRUE,
title = "Age Distribution by Birth Sex",
axis.titles = c('Respondents Age Bands'),
legend.title= "Birth Sex",
geom.colors = c("#006cc5","#cbcccb"),
show.summary = TRUE )+
set_theme(base= theme_classic())
#Alternative View, if Birth Sex by Age is desired
CrossTable(SURVEY$BIRTHSEX, SURVEY$AGE, prop.chisq=F, prop.c=F, prop.t=F, chisq=T, fisher=T) #rows then/over columns
##
##
## Cell Contents
## |-------------------------|
## | N |
## | N / Row Total |
## |-------------------------|
##
##
## Total Observations in Table: 200
##
##
## | SURVEY$AGE
## SURVEY$BIRTHSEX | < 30 | 30-34 | 35-40 | 41-50 | Row Total |
## ----------------|-----------|-----------|-----------|-----------|-----------|
## F | 9 | 80 | 10 | 0 | 99 |
## | 0.091 | 0.808 | 0.101 | 0.000 | 0.495 |
## ----------------|-----------|-----------|-----------|-----------|-----------|
## M | 7 | 75 | 18 | 1 | 101 |
## | 0.069 | 0.743 | 0.178 | 0.010 | 0.505 |
## ----------------|-----------|-----------|-----------|-----------|-----------|
## Column Total | 16 | 155 | 28 | 1 | 200 |
## ----------------|-----------|-----------|-----------|-----------|-----------|
##
##
## Statistics for All Table Factors
##
##
## Pearson's Chi-squared test
## ------------------------------------------------------------
## Chi^2 = 3.677372 d.f. = 3 p = 0.2984756
##
##
##
## Fisher's Exact Test for Count Data
## ------------------------------------------------------------
## Alternative hypothesis: two.sided
## p = 0.2661718
##
##
#SJPlot cross tabulation with Chi-Square/df
plot_xtab(SURVEY$RACE, SURVEY$BIRTHSEX, margin = "row",
bar.pos = "stack", coord.flip = TRUE,
title = "Race Distribution by Birth Sex",
axis.titles = c('Race Categories '),
legend.title= "Birth Sex",
geom.colors = c("#006cc5","#cbcccb"),
show.summary = TRUE )+
set_theme(base= theme_classic())
#Alternative View, if Birth Sex by Race is desired
CrossTable(SURVEY$RACE, SURVEY$BIRTHSEX, prop.chisq=F, prop.c=T, prop.r = F, prop.t=F, chisq=T, fisher=F) #rows then/over columns
##
##
## Cell Contents
## |-------------------------|
## | N |
## | N / Col Total |
## |-------------------------|
##
##
## Total Observations in Table: 200
##
##
## | SURVEY$BIRTHSEX
## SURVEY$RACE | F | M | Row Total |
## -------------|-----------|-----------|-----------|
## ASIAN EAST | 19 | 11 | 30 |
## | 0.192 | 0.109 | |
## -------------|-----------|-----------|-----------|
## ASIAN SOUTH | 29 | 21 | 50 |
## | 0.293 | 0.208 | |
## -------------|-----------|-----------|-----------|
## BLACK | 5 | 5 | 10 |
## | 0.051 | 0.050 | |
## -------------|-----------|-----------|-----------|
## HISPANIC | 8 | 5 | 13 |
## | 0.081 | 0.050 | |
## -------------|-----------|-----------|-----------|
## WHITE | 32 | 53 | 85 |
## | 0.323 | 0.525 | |
## -------------|-----------|-----------|-----------|
## OTHER | 6 | 6 | 12 |
## | 0.061 | 0.059 | |
## -------------|-----------|-----------|-----------|
## Column Total | 99 | 101 | 200 |
## | 0.495 | 0.505 | |
## -------------|-----------|-----------|-----------|
##
##
## Statistics for All Table Factors
##
##
## Pearson's Chi-squared test
## ------------------------------------------------------------
## Chi^2 = 9.274804 d.f. = 5 p = 0.09859255
##
##
##
#SJPlot cross tabulation with Chi-Square/df
plot_xtab(SURVEY$TRAINING_LEVEL, SURVEY$BIRTHSEX, margin = "row",
bar.pos = "stack", coord.flip = TRUE,
title = "Training Levels by Birth Sex",
axis.titles = c('Training Levels'),
legend.title= "Birth Sex",
geom.colors = c("#006cc5","#cbcccb"),
show.summary = TRUE )+
set_theme(base= theme_classic())
#Alternative View, if Birth Sex by Training Level is desired
CrossTable(SURVEY$BIRTHSEX, SURVEY$TRAINING_LEVEL, prop.chisq=F, prop.c=F, prop.t=F, chisq=T, fisher=F) #rows then/over columns
##
##
## Cell Contents
## |-------------------------|
## | N |
## | N / Row Total |
## |-------------------------|
##
##
## Total Observations in Table: 199
##
##
## | SURVEY$TRAINING_LEVEL
## SURVEY$BIRTHSEX | First Year | Second Year | Third Year | Avanced | Row Total |
## ----------------|-------------|-------------|-------------|-------------|-------------|
## F | 40 | 34 | 20 | 5 | 99 |
## | 0.404 | 0.343 | 0.202 | 0.051 | 0.497 |
## ----------------|-------------|-------------|-------------|-------------|-------------|
## M | 32 | 26 | 36 | 6 | 100 |
## | 0.320 | 0.260 | 0.360 | 0.060 | 0.503 |
## ----------------|-------------|-------------|-------------|-------------|-------------|
## Column Total | 72 | 60 | 56 | 11 | 199 |
## ----------------|-------------|-------------|-------------|-------------|-------------|
##
##
## Statistics for All Table Factors
##
##
## Pearson's Chi-squared test
## ------------------------------------------------------------
## Chi^2 = 6.613035 d.f. = 3 p = 0.0853097
##
##
##
#SJPlot cross tabulation with Chi-Square/df
plot_xtab(SURVEY$HEIGHT2, SURVEY$BIRTHSEX, margin = "row",
bar.pos = "stack", coord.flip = TRUE,
title = "Height Bands by Birth Sex",
axis.titles = c('Height Bands'),
legend.title= "Birth Sex",
geom.colors = c("#006cc5","#cbcccb"),
show.summary = TRUE )+
set_theme(base= theme_classic())
SUBSET2 <-
SURVEY %>%
filter( !is.na(HEIGHT2)) %>%
mutate(BIRTHSEX = recode_factor( BIRTHSEX, "M" = "MALES", "F" = "FEMALES", .ordered=T))
ggplot( SUBSET2, aes(x= HEIGHT2)) + facet_grid( SUBSET2$BIRTHSEX ) +
geom_bar(aes(fill= BIRTHSEX) ) +
stat_count(geom="text", aes(label=..count..), vjust= -.3) +
scale_fill_manual( values = c( "MALES"="darkgrey", "FEMALES"="#006cc5"), guide = "none" )+
theme_538() +
xlab("Height Bands")+ ylab("Counts")
#Alternative View, if Birth Sex by Height is desired
CrossTable(SURVEY$HEIGHT2, SURVEY$BIRTHSEX, prop.chisq=F, prop.c=T, prop.r = F, prop.t=F, chisq=T, fisher=F) #rows then/over columns
##
##
## Cell Contents
## |-------------------------|
## | N |
## | N / Col Total |
## |-------------------------|
##
##
## Total Observations in Table: 199
##
##
## | SURVEY$BIRTHSEX
## SURVEY$HEIGHT2 | F | M | Row Total |
## ---------------|-----------|-----------|-----------|
## < 5' | 1 | 0 | 1 |
## | 0.010 | 0.000 | |
## ---------------|-----------|-----------|-----------|
## 5-5'3 | 33 | 2 | 35 |
## | 0.337 | 0.020 | |
## ---------------|-----------|-----------|-----------|
## 5'4-5'6 | 40 | 9 | 49 |
## | 0.408 | 0.089 | |
## ---------------|-----------|-----------|-----------|
## 5'7-5'9 | 23 | 34 | 57 |
## | 0.235 | 0.337 | |
## ---------------|-----------|-----------|-----------|
## 5'10-6' | 1 | 34 | 35 |
## | 0.010 | 0.337 | |
## ---------------|-----------|-----------|-----------|
## 6'1-6'4 | 0 | 21 | 21 |
## | 0.000 | 0.208 | |
## ---------------|-----------|-----------|-----------|
## > 6'4 | 0 | 1 | 1 |
## | 0.000 | 0.010 | |
## ---------------|-----------|-----------|-----------|
## Column Total | 98 | 101 | 199 |
## | 0.492 | 0.508 | |
## ---------------|-----------|-----------|-----------|
##
##
## Statistics for All Table Factors
##
##
## Pearson's Chi-squared test
## ------------------------------------------------------------
## Chi^2 = 103.2847 d.f. = 6 p = 5.173731e-20
##
##
##
require(ggstatsplot)
#SJPlot cross tabulation with Chi-Square/df
plot_xtab(SURVEY$GLOVE, SURVEY$BIRTHSEX, margin = "row",
bar.pos = "stack", coord.flip = TRUE,
title = "Glove Size by Birth Sex",
axis.titles = c('Glove Sizes'),
legend.title= "Birth Sex",
geom.colors = c("#006cc5","#cbcccb"),
show.summary = TRUE )+
set_theme(base= theme_classic())
#Alternative View, if Birth Sex by Glove Size is desired
CrossTable(SURVEY$GLOVE, SURVEY$BIRTHSEX, prop.chisq=F, prop.c=T, prop.r=F, prop.t=F, chisq=T) #rows then/over columns
##
##
## Cell Contents
## |-------------------------|
## | N |
## | N / Col Total |
## |-------------------------|
##
##
## Total Observations in Table: 195
##
##
## | SURVEY$BIRTHSEX
## SURVEY$GLOVE | F | M | Row Total |
## -------------|-----------|-----------|-----------|
## 5 | 1 | 0 | 1 |
## | 0.010 | 0.000 | |
## -------------|-----------|-----------|-----------|
## 5.5 | 7 | 0 | 7 |
## | 0.073 | 0.000 | |
## -------------|-----------|-----------|-----------|
## 6 | 24 | 0 | 24 |
## | 0.250 | 0.000 | |
## -------------|-----------|-----------|-----------|
## 6.5 | 48 | 6 | 54 |
## | 0.500 | 0.061 | |
## -------------|-----------|-----------|-----------|
## 7 | 14 | 31 | 45 |
## | 0.146 | 0.313 | |
## -------------|-----------|-----------|-----------|
## 7.5 | 2 | 49 | 51 |
## | 0.021 | 0.495 | |
## -------------|-----------|-----------|-----------|
## 8 | 0 | 10 | 10 |
## | 0.000 | 0.101 | |
## -------------|-----------|-----------|-----------|
## 8.5 | 0 | 3 | 3 |
## | 0.000 | 0.030 | |
## -------------|-----------|-----------|-----------|
## Column Total | 96 | 99 | 195 |
## | 0.492 | 0.508 | |
## -------------|-----------|-----------|-----------|
##
##
## Statistics for All Table Factors
##
##
## Pearson's Chi-squared test
## ------------------------------------------------------------
## Chi^2 = 127.3866 d.f. = 7 p = 2.208597e-24
##
##
##
#Median Glove Size - Sex Difference
SURVEY %>%
group_by( BIRTHSEX) %>%
summarize( GLOVE_MEDIAN = median(GLOVE, na.rm=T))
## # A tibble: 2 × 2
## BIRTHSEX GLOVE_MEDIAN
## <fct> <dbl>
## 1 F 6.5
## 2 M 7.5
ggbetweenstats( data= SURVEY,
x = BIRTHSEX,
y = GLOVE,
type="nonparametric",
p.adjust.method = "none")
#SJPlot cross tabulation with Chi-Square/df
plot_xtab(SURVEY$PERFORMANCE_HOURS, SURVEY$BIRTHSEX, margin = "row",
bar.pos = "stack", coord.flip = TRUE,
title = "Performance Hours by Birth Sex",
axis.titles = c('Performance Hour Bands'),
legend.title= "Birth Sex",
geom.colors = c("#006cc5","#cbcccb"),
show.summary = TRUE )+
set_theme(base= theme_classic())
#Alternative View, if Birth Sex by Performance Hours is desired
CrossTable(SURVEY$BIRTHSEX, SURVEY$PERFORMANCE_HOURS, prop.chisq=F, prop.c=F, prop.t=F, chisq=T, fisher=T) #rows then/over columns
##
##
## Cell Contents
## |-------------------------|
## | N |
## | N / Row Total |
## |-------------------------|
##
##
## Total Observations in Table: 199
##
##
## | SURVEY$PERFORMANCE_HOURS
## SURVEY$BIRTHSEX | < 10 | 10-20 | 21-30 | 31-40 | > 40 | Row Total |
## ----------------|-----------|-----------|-----------|-----------|-----------|-----------|
## F | 22 | 48 | 19 | 7 | 2 | 98 |
## | 0.224 | 0.490 | 0.194 | 0.071 | 0.020 | 0.492 |
## ----------------|-----------|-----------|-----------|-----------|-----------|-----------|
## M | 26 | 45 | 23 | 5 | 2 | 101 |
## | 0.257 | 0.446 | 0.228 | 0.050 | 0.020 | 0.508 |
## ----------------|-----------|-----------|-----------|-----------|-----------|-----------|
## Column Total | 48 | 93 | 42 | 12 | 4 | 199 |
## ----------------|-----------|-----------|-----------|-----------|-----------|-----------|
##
##
## Statistics for All Table Factors
##
##
## Pearson's Chi-squared test
## ------------------------------------------------------------
## Chi^2 = 1.099417 d.f. = 4 p = 0.8943647
##
##
##
## Fisher's Exact Test for Count Data
## ------------------------------------------------------------
## Alternative hypothesis: two.sided
## p = 0.9059433
##
##
#SJPlot cross tabulation with Chi-Square/df
plot_xtab(SURVEY$BIRTHSEX, SURVEY$TEACHER_GENDER_PREFERENCE, margin = "row",
bar.pos = "stack", coord.flip = TRUE,
title = "Teacher Sex Preference by Birth Sex",
axis.titles = "Birth Sex",
legend.title= "Teacher Sex Pref?",
geom.colors = c("#006cc5","#cbcccb"),
show.summary = TRUE )+
set_theme(base= theme_classic())
#SJPlot cross tabulation with Chi-Square/df
plot_xtab(SURVEY$FEMALE_TRAINERS, SURVEY$BIRTHSEX, margin = "row",
bar.pos = "stack", coord.flip = TRUE,
title = "Number of Female Trainers by Birth Sex",
axis.titles = c('Approx. Female Trainers'),
legend.title= "Birth Sex",
geom.colors = c("#006cc5","#cbcccb"),
show.summary = TRUE )+
set_theme(base= theme_classic())
#Alternative View, if Birth Sex by Number of Female Trainers is desired
CrossTable(SURVEY$BIRTHSEX, SURVEY$FEMALE_TRAINERS, prop.chisq=F, prop.c=F, prop.t=F, chisq=T, fisher=T) #rows then/over columns
##
##
## Cell Contents
## |-------------------------|
## | N |
## | N / Row Total |
## |-------------------------|
##
##
## Total Observations in Table: 200
##
##
## | SURVEY$FEMALE_TRAINERS
## SURVEY$BIRTHSEX | None | 1-2 | 3-5 | 6-10 | > 10 | Row Total |
## ----------------|-----------|-----------|-----------|-----------|-----------|-----------|
## F | 2 | 8 | 42 | 38 | 9 | 99 |
## | 0.020 | 0.081 | 0.424 | 0.384 | 0.091 | 0.495 |
## ----------------|-----------|-----------|-----------|-----------|-----------|-----------|
## M | 1 | 8 | 36 | 38 | 18 | 101 |
## | 0.010 | 0.079 | 0.356 | 0.376 | 0.178 | 0.505 |
## ----------------|-----------|-----------|-----------|-----------|-----------|-----------|
## Column Total | 3 | 16 | 78 | 76 | 27 | 200 |
## ----------------|-----------|-----------|-----------|-----------|-----------|-----------|
##
##
## Statistics for All Table Factors
##
##
## Pearson's Chi-squared test
## ------------------------------------------------------------
## Chi^2 = 3.775249 d.f. = 4 p = 0.4372761
##
##
##
## Fisher's Exact Test for Count Data
## ------------------------------------------------------------
## Alternative hypothesis: two.sided
## p = 0.4349633
##
##
plot_xtab(SURVEY$MALE_TRAINERS, SURVEY$BIRTHSEX, margin = "row",
bar.pos = "stack", coord.flip = TRUE,
title = "Number of Male Trainers by Birth Sex",
axis.titles = c('Approx. Male Trainers'),
legend.title= "Birth Sex",
geom.colors = c("#006cc5","#cbcccb"),
show.summary = TRUE )+
set_theme(base= theme_classic())
#Alternative View, if Birth Sex by Number of Male Trainers is desired
CrossTable(SURVEY$BIRTHSEX, SURVEY$MALE_TRAINERS, prop.chisq=F, prop.c=F, prop.t=F, chisq=T, fisher=T) #rows then/over columns
##
##
## Cell Contents
## |-------------------------|
## | N |
## | N / Row Total |
## |-------------------------|
##
##
## Total Observations in Table: 200
##
##
## | SURVEY$MALE_TRAINERS
## SURVEY$BIRTHSEX | 1-2 | 3-5 | 6-10 | > 10 | Row Total |
## ----------------|-----------|-----------|-----------|-----------|-----------|
## F | 0 | 6 | 47 | 46 | 99 |
## | 0.000 | 0.061 | 0.475 | 0.465 | 0.495 |
## ----------------|-----------|-----------|-----------|-----------|-----------|
## M | 2 | 9 | 47 | 43 | 101 |
## | 0.020 | 0.089 | 0.465 | 0.426 | 0.505 |
## ----------------|-----------|-----------|-----------|-----------|-----------|
## Column Total | 2 | 15 | 94 | 89 | 200 |
## ----------------|-----------|-----------|-----------|-----------|-----------|
##
##
## Statistics for All Table Factors
##
##
## Pearson's Chi-squared test
## ------------------------------------------------------------
## Chi^2 = 2.681392 d.f. = 3 p = 0.4433988
##
##
##
## Fisher's Exact Test for Count Data
## ------------------------------------------------------------
## Alternative hypothesis: two.sided
## p = 0.5466762
##
##
#SJPlot cross tabulation with Chi-Square/df
plot_xtab( SURVEY$BIRTHSEX, SURVEY$EXPERIENCED_TRANSIENT_PAIN_HAND, margin = "row",
bar.pos = "stack", coord.flip = TRUE,
title = "Transient Pain in Hand after Procedure by Birth Sex",
axis.titles = "Birth Sex",
legend.title= "Hand Pain?",
geom.colors = c("#006cc5","#cbcccb"),
show.summary = TRUE )+
set_theme(base= theme_classic())
plot_xtab(SURVEY$BIRTHSEX, SURVEY$EXPERIENCED_TRANSIENT_PAIN_NECK_SHOULDER, margin = "row",
bar.pos = "stack", coord.flip = TRUE,
title = "Transient Pain in Neck/Shoulder after Procedure by Birth Sex",
axis.titles = "Birth Sex",
legend.title= "Neck/Should Pain?",
geom.colors = c("#006cc5","#cbcccb"),
show.summary = TRUE )+
set_theme(base= theme_classic())
plot_xtab(SURVEY$BIRTHSEX,SURVEY$EXPERIENCED_TRANSIENT_PAIN_BACK, margin = "row",
bar.pos = "stack", coord.flip = TRUE,
title = "Transient Pain in Back after Procedure by Birth Sex",
axis.titles = "Birth Sex",
legend.title= "Back Pain?",
geom.colors = c("#006cc5","#cbcccb"),
show.summary = TRUE )+
set_theme(base= theme_classic())
plot_xtab(SURVEY$BIRTHSEX, SURVEY$EXPERIENCED_TRANSIENT_PAIN_LEG, margin = "row",
bar.pos = "stack", coord.flip = TRUE,
title = "Transient Pain in Leg after Procedure by Birth Sex",
axis.titles = "Birth Sex",
legend.title= "Leg Pain?",
geom.colors = c("#006cc5","#cbcccb"),
show.summary = TRUE )+
set_theme(base= theme_classic())
plot_xtab(SURVEY$BIRTHSEX, SURVEY$EXPERIENCED_TRANSIENT_PAIN_FOOT, margin = "row",
bar.pos = "stack", coord.flip = TRUE,
title = "Transient Pain in Foot after Procedure by Birth Sex",
axis.titles = "Birth Sex",
legend.title= "Foot Pain?",
geom.colors = c("#006cc5","#cbcccb"),
show.summary = TRUE )+
set_theme(base= theme_classic())
#SJPlot cross tabulation with Chi-Square/df
SUBSET <- sqldf( "select BIRTHSEX,
GROWING_PAINS
from SURVEY
where GROWING_PAINS != 'NA' ")
SUBSET <- SUBSET %>%
mutate(GROWING_PAINS = recode_factor( GROWING_PAINS, "N" = "N",
"Y" = "Y")) %>% droplevels()
plot_xtab(SUBSET$BIRTHSEX, SUBSET$GROWING_PAINS, margin = "row",
bar.pos = "stack", coord.flip = TRUE,
title = "Told Injuries were Growing Pains by Birth Sex",
axis.titles = "Birth Sex",
legend.title= "Growing Pains?",
geom.colors = c("#006cc5","#cbcccb"),
show.summary = TRUE )+
set_theme(base= theme_classic())
plot_xtab(SURVEY$BIRTHSEX, SURVEY$FELLOWSHIP_FORMAL_ERGO_TRAINING, margin = "row",
bar.pos = "stack", coord.flip = TRUE,
title = "Formal Ergo Training by Birth Sex",
axis.titles = "Birth Sex",
legend.title= "Formal Ergo Traiing?",
geom.colors = c("#006cc5","#cbcccb"),
show.summary = TRUE )+
set_theme(base= theme_classic())
plot_xtab(SURVEY$INFORMAL_TRAINING, SURVEY$BIRTHSEX, margin = "row",
bar.pos = "stack", coord.flip = TRUE,
title = "Informal Ergo Training by Birth Sex",
axis.titles = "Birth Sex",
legend.title= "Informal Ergo Training?",
geom.colors = c("#006cc5","#cbcccb"),
show.summary = TRUE )+
set_theme(base= theme_classic())
plot_xtab(SURVEY$BIRTHSEX, SURVEY$TRAINING_TECHNIQUES_POSTURAL, margin = "row",
bar.pos = "stack", coord.flip = TRUE,
title = "Training on Postural Awareness by Birth Sex",
axis.titles = "Birth Sex",
legend.title= "Training Postural Awareness?",
geom.colors = c("#006cc5","#cbcccb"),
show.summary = TRUE )+
set_theme(base= theme_classic())
plot_xtab(SURVEY$BIRTHSEX, SURVEY$TRAINING_TECHNIQUES_BEDHEIGHT, margin = "row",
bar.pos = "stack", coord.flip = TRUE,
title = "Training on Bed Height Adjustments by Birth Sex",
axis.titles = "Birth Sex",
legend.title= "Training Bed Height?",
geom.colors = c("#006cc5","#cbcccb"),
show.summary = TRUE )+
set_theme(base= theme_classic())
plot_xtab(SURVEY$BIRTHSEX, SURVEY$TRAINING_TECHNIQUES_BEDANGLE, margin = "row",
bar.pos = "stack", coord.flip = TRUE,
title = "Training on Bed Angle Adjustments by Birth Sex",
axis.titles = "Birth Sex",
legend.title= "Training Bed Angle?",
geom.colors = c("#006cc5","#cbcccb"),
show.summary = TRUE )+
set_theme(base= theme_classic())
plot_xtab(SURVEY$BIRTHSEX, SURVEY$TRAINING_TECHNIQUES_MONITORHEIGHT, margin = "row",
bar.pos = "stack", coord.flip = TRUE,
title = "Training on Monitor Height Adjustments by Birth Sex",
axis.titles = "Birth Sex",
legend.title= "Training Monitor Height?",
geom.colors = c("#006cc5","#cbcccb"),
show.summary = TRUE )+
set_theme(base= theme_classic())
plot_xtab(SURVEY$BIRTHSEX, SURVEY$TRAINING_TECHNIQUES_MUSCULOSKELETAL, margin = "row",
bar.pos = "stack", coord.flip = TRUE,
title = "Training on Musculoskeletal Maneuvers by Birth Sex",
axis.titles = "Birth Sex",
legend.title= "Training Musculoskeletal?",
geom.colors = c("#006cc5","#cbcccb"),
show.summary = TRUE )+
set_theme(base= theme_classic())
plot_xtab(SURVEY$BIRTHSEX, SURVEY$TRAINING_TECHNIQUES_EXERCISE_STRETCHING, margin = "row",
bar.pos = "stack", coord.flip = TRUE,
title = "Training on Exercise/Stretching by Birth Sex",
axis.titles = "Birth Sex",
legend.title= "Training Exer/Stretch?",
geom.colors = c("#006cc5","#cbcccb"),
show.summary = TRUE )+
set_theme(base= theme_classic())
plot_xtab(SURVEY$TRAINING_TECHNIQUES_DIAL_EXTENDERS, SURVEY$BIRTHSEX, margin = "row",
bar.pos = "stack", coord.flip = TRUE,
title = "Training on Dial Extenders by Birth Sex",
axis.titles = "Birth Sex",
legend.title= "Training Dial Ext?",
geom.colors = c("#006cc5","#cbcccb"),
show.summary = TRUE )+
set_theme(base= theme_classic())
plot_xtab(SURVEY$BIRTHSEX, SURVEY$TRAINING_TECHNIQUES_PEDIATRIC_COLONOSCOPE, margin = "row",
bar.pos = "stack", coord.flip = TRUE,
title = "Training on Pediatric Colonoscopes by Birth Sex",
axis.titles = "Birth Sex",
legend.title= "Traiing Pedi Coloscope?",
geom.colors = c("#006cc5","#cbcccb"),
show.summary = TRUE )+
set_theme(base= theme_classic())
plot_xtab(SURVEY$ERGO_TRAINING_BUDGET, SURVEY$BIRTHSEX, margin = "row",
bar.pos = "stack", coord.flip = TRUE,
title = "Ergonomic Training Budget by Birth Sex",
axis.titles = c('Ergonomic Training Budget?'),
legend.title= "Birth Sex",
geom.colors = c("#006cc5","#cbcccb"),
show.summary = TRUE )+
set_theme(base= theme_classic())
#Alternative View, if Birth Sex by Ergo Training Budget is desired
CrossTable(SURVEY$BIRTHSEX, SURVEY$ERGO_TRAINING_BUDGET, prop.chisq=F, prop.c=F, prop.t=F, chisq=T, fisher=T) #rows then/over columns
##
##
## Cell Contents
## |-------------------------|
## | N |
## | N / Row Total |
## |-------------------------|
##
##
## Total Observations in Table: 200
##
##
## | SURVEY$ERGO_TRAINING_BUDGET
## SURVEY$BIRTHSEX | Y | N | DK | Row Total |
## ----------------|-----------|-----------|-----------|-----------|
## F | 2 | 24 | 73 | 99 |
## | 0.020 | 0.242 | 0.737 | 0.495 |
## ----------------|-----------|-----------|-----------|-----------|
## M | 0 | 31 | 70 | 101 |
## | 0.000 | 0.307 | 0.693 | 0.505 |
## ----------------|-----------|-----------|-----------|-----------|
## Column Total | 2 | 55 | 143 | 200 |
## ----------------|-----------|-----------|-----------|-----------|
##
##
## Statistics for All Table Factors
##
##
## Pearson's Chi-squared test
## ------------------------------------------------------------
## Chi^2 = 2.93414 d.f. = 2 p = 0.2306002
##
##
##
## Fisher's Exact Test for Count Data
## ------------------------------------------------------------
## Alternative hypothesis: two.sided
## p = 0.2478861
##
##
plot_xtab(SURVEY$ERGO_FEEDBACK, SURVEY$BIRTHSEX, margin = "row",
bar.pos = "stack", coord.flip = TRUE,
title = "Ergo Feedback Frequency by Birth Sex",
axis.titles = c('How Frequently Ergo Feedback?'),
legend.title= "Birth Sex",
geom.colors = c("#006cc5","#cbcccb"),
show.summary = TRUE )+
set_theme(base= theme_classic())
#Alternative View, if Birth Sex by Ergo Feedback Frequency is desired
CrossTable(SURVEY$BIRTHSEX, SURVEY$ERGO_FEEDBACK, prop.chisq=F, prop.c=F, prop.t=F, chisq=T, fisher=T) #rows then/over columns
##
##
## Cell Contents
## |-------------------------|
## | N |
## | N / Row Total |
## |-------------------------|
##
##
## Total Observations in Table: 200
##
##
## | SURVEY$ERGO_FEEDBACK
## SURVEY$BIRTHSEX | Never | Rarely | Sometimes | Often | Row Total |
## ----------------|-----------|-----------|-----------|-----------|-----------|
## F | 2 | 29 | 55 | 13 | 99 |
## | 0.020 | 0.293 | 0.556 | 0.131 | 0.495 |
## ----------------|-----------|-----------|-----------|-----------|-----------|
## M | 4 | 39 | 49 | 9 | 101 |
## | 0.040 | 0.386 | 0.485 | 0.089 | 0.505 |
## ----------------|-----------|-----------|-----------|-----------|-----------|
## Column Total | 6 | 68 | 104 | 22 | 200 |
## ----------------|-----------|-----------|-----------|-----------|-----------|
##
##
## Statistics for All Table Factors
##
##
## Pearson's Chi-squared test
## ------------------------------------------------------------
## Chi^2 = 3.191001 d.f. = 3 p = 0.3631037
##
##
##
## Fisher's Exact Test for Count Data
## ------------------------------------------------------------
## Alternative hypothesis: two.sided
## p = 0.3735388
##
##
plot_xtab(SURVEY$ERGO_FEEDBACK_BY_WHOM, SURVEY$BIRTHSEX, margin = "row",
bar.pos = "stack", coord.flip = TRUE,
title = "Who Provides Ergo Feedback by Birth Sex",
axis.titles = c('Who Provides Feedback?'),
legend.title= "Birth Sex",
geom.colors = c("#006cc5","#cbcccb"),
show.summary = TRUE )+
set_theme(base= theme_classic())
#Alternative View, if Birth Sex by Ergo Feedback by Whom is desired
CrossTable(SURVEY$ERGO_FEEDBACK_BY_WHOM, SURVEY$BIRTHSEX, prop.chisq=F, prop.c=T, prop.r=F, prop.t=F, chisq=T, fisher=T) #rows then/over columns
##
##
## Cell Contents
## |-------------------------|
## | N |
## | N / Col Total |
## |-------------------------|
##
##
## Total Observations in Table: 200
##
##
## | SURVEY$BIRTHSEX
## SURVEY$ERGO_FEEDBACK_BY_WHOM | F | M | Row Total |
## --------------------------------|-----------|-----------|-----------|
## Do not/rarely received feedback | 10 | 17 | 27 |
## | 0.101 | 0.168 | |
## --------------------------------|-----------|-----------|-----------|
## Mostly male teachers | 16 | 19 | 35 |
## | 0.162 | 0.188 | |
## --------------------------------|-----------|-----------|-----------|
## Mostly female teachers | 18 | 15 | 33 |
## | 0.182 | 0.149 | |
## --------------------------------|-----------|-----------|-----------|
## Both equally | 55 | 50 | 105 |
## | 0.556 | 0.495 | |
## --------------------------------|-----------|-----------|-----------|
## Column Total | 99 | 101 | 200 |
## | 0.495 | 0.505 | |
## --------------------------------|-----------|-----------|-----------|
##
##
## Statistics for All Table Factors
##
##
## Pearson's Chi-squared test
## ------------------------------------------------------------
## Chi^2 = 2.563036 d.f. = 3 p = 0.4640066
##
##
##
## Fisher's Exact Test for Count Data
## ------------------------------------------------------------
## Alternative hypothesis: two.sided
## p = 0.4709419
##
##
plot_xtab( SURVEY$BIRTHSEX, SURVEY$ERGO_OPTIMIZATION, margin = "row",
bar.pos = "stack", coord.flip = TRUE,
title = "Ergonomically Optimized Equipment by Birth Sex",
axis.titles = "Birth Sex",
legend.title= "Ergo Optimization?",
geom.colors = c("#006cc5", "lightblue", "#cbcccb"),
show.summary = TRUE )+
set_theme(base= theme_classic())
plot_xtab(SURVEY$BIRTHSEX, SURVEY$GLOVE_SIZE_AVAILABLE, margin = "row",
bar.pos = "stack", coord.flip = TRUE,
title = "Glove Size Availability by Birth Sex",
axis.titles = "Birth Sex",
legend.title= "Glove Size Avail?",
geom.colors = c("#006cc5","#cbcccb"),
show.summary = TRUE )+
set_theme(base= theme_classic())
plot_xtab(SURVEY$BIRTHSEX, SURVEY$DIAL_EXTENDERS_AVAILABLE, margin = "row",
bar.pos = "stack", coord.flip = TRUE,
title = "Dial Extender Availability by Birth Sex",
axis.titles = "Birth Sex",
legend.title= "Dial Ext Avail?",
geom.colors = c("#006cc5","lightblue", "#cbcccb"),
show.summary = TRUE )+
set_theme(base= theme_classic())
SUBSET <- sqldf( "select BIRTHSEX,
DIAL_EXTENDERS_ENCOURAGED
from SURVEY
where DIAL_EXTENDERS_ENCOURAGED != 'DU' ")
SUBSET <- SUBSET %>%
mutate(DIAL_EXTENDERS_ENCOURAGED = recode_factor( DIAL_EXTENDERS_ENCOURAGED, "N" = "N",
"Y" = "Y")) %>% droplevels()
plot_xtab(SUBSET$BIRTHSEX, SUBSET$DIAL_EXTENDERS_ENCOURAGED, margin = "row",
bar.pos = "stack", coord.flip = TRUE,
title = "Dial Extenders Encouraged by Birth Sex - (Includes only subjects who use Dial Extenders)",
axis.titles = "Birth Sex",
legend.title= "Dial Ext Encouraged?",
geom.colors = c("#006cc5","#cbcccb"),
show.summary = TRUE )+
set_theme(base= theme_classic())
SUBSET <- sqldf( "select BIRTHSEX,
DIAL_EXTENDERS_FEMALEATT
from SURVEY
where DIAL_EXTENDERS_FEMALEATT != 'NA' ")
SUBSET <- SUBSET %>%
mutate(DIAL_EXTENDERS_FEMALEATT = recode_factor( DIAL_EXTENDERS_FEMALEATT, "N" = "N",
"Y" = "Y")) %>% droplevels()
plot_xtab(SUBSET$BIRTHSEX, SUBSET$DIAL_EXTENDERS_FEMALEATT, margin = "row",
bar.pos = "stack", coord.flip = TRUE,
title = "Dial Extenders Encouraged with Female Att by Birth Sex - (Includes only subjects who use Dial Extenders)",
axis.titles = "Birth Sex",
legend.title= "Dial Ext FemAtt?",
geom.colors = c("#006cc5","lightblue", "#cbcccb"),
show.summary = TRUE )+
set_theme(base= theme_classic())
SUBSET <- sqldf( "select BIRTHSEX,
DIAL_EXTENDERS_MALEATT
from SURVEY
where DIAL_EXTENDERS_MALEATT != 'NA' ")
SUBSET <- SUBSET %>%
mutate(DIAL_EXTENDERS_MALEATT = recode_factor( DIAL_EXTENDERS_MALEATT, "N" = "N",
"Y" = "Y")) %>% droplevels()
plot_xtab(SUBSET$BIRTHSEX, SUBSET$DIAL_EXTENDERS_MALEATT, margin = "row",
bar.pos = "stack", coord.flip = TRUE,
title = "Dial Extenders Encouraged with Male Att by Birth Sex - (Includes only subjects who use Dial Extenders)",
axis.titles = "Birth Sex",
legend.title= "Dial Ext MaleAtt?",
geom.colors = c("#006cc5","lightblue", "#cbcccb"),
show.summary = TRUE )+
set_theme(base= theme_classic())
plot_xtab(SURVEY$PEDI_COLONOSCOPES_AVAILABLE, SURVEY$BIRTHSEX, margin = "row",
bar.pos = "stack", coord.flip = TRUE,
title = "Pediatric Colonoscopes by Birth Sex",
axis.titles = c('Pedi Colonoscopes Available?'),
legend.title= "Birth Sex",
geom.colors = c("#006cc5","#cbcccb"),
show.summary = TRUE )+
set_theme(base= theme_classic())
#Alternative View, if Birth Sex by Pedi Colonoscopes is desired
CrossTable(SURVEY$BIRTHSEX, SURVEY$PEDI_COLONOSCOPES_AVAILABLE, prop.chisq=F, prop.c=F, prop.t=F, chisq=T, fisher=T) #rows then/over columns
##
##
## Cell Contents
## |-------------------------|
## | N |
## | N / Row Total |
## |-------------------------|
##
##
## Total Observations in Table: 199
##
##
## | SURVEY$PEDI_COLONOSCOPES_AVAILABLE
## SURVEY$BIRTHSEX | Y | N | DK | Row Total |
## ----------------|-----------|-----------|-----------|-----------|
## F | 93 | 2 | 3 | 98 |
## | 0.949 | 0.020 | 0.031 | 0.492 |
## ----------------|-----------|-----------|-----------|-----------|
## M | 100 | 0 | 1 | 101 |
## | 0.990 | 0.000 | 0.010 | 0.508 |
## ----------------|-----------|-----------|-----------|-----------|
## Column Total | 193 | 2 | 4 | 199 |
## ----------------|-----------|-----------|-----------|-----------|
##
##
## Statistics for All Table Factors
##
##
## Pearson's Chi-squared test
## ------------------------------------------------------------
## Chi^2 = 3.209389 d.f. = 2 p = 0.2009509
##
##
##
## Fisher's Exact Test for Count Data
## ------------------------------------------------------------
## Alternative hypothesis: two.sided
## p = 0.178596
##
##
plot_xtab(SURVEY$BIRTHSEX, SURVEY$LEAD_APRONS_DONTKNOW, margin = "row",
bar.pos = "stack", coord.flip = TRUE,
title = "Don't Know Whether Lead Aprons Available at Institution by Birth Sex",
axis.titles = "Birth Sex",
legend.title= "Aware of Lead Aprons?",
geom.colors = c("#006cc5","#cbcccb"),
show.summary = TRUE )+
set_theme(base= theme_classic())
plot_xtab( SURVEY$BIRTHSEX, SURVEY$LEAD_APRONS_LW_ONEPIECE,margin = "row",
bar.pos = "stack", coord.flip = TRUE,
title = "Lead Aprons LW One-Piece Available at Institution by Birth Sex",
axis.titles = "Birth Sex",
legend.title= "Lead Aprons LW 1P?",
geom.colors = c("#006cc5","#cbcccb"),
show.summary = TRUE )+
set_theme(base= theme_classic())
plot_xtab(SURVEY$BIRTHSEX, SURVEY$LEAD_APRONS_LW_TWOPIECE, margin = "row",
bar.pos = "stack", coord.flip = TRUE,
title = "Lead Aprons LW Two-Piece Available at Institution by Birth Sex",
axis.titles = "Birth Sex",
legend.title= "Lead Aprons LW 2P?",
geom.colors = c("#006cc5","#cbcccb"),
show.summary = TRUE )+
set_theme(base= theme_classic())
plot_xtab(SURVEY$BIRTHSEX, SURVEY$LEAD_APRONS_STANDARD_ONEPIECE, margin = "row",
bar.pos = "stack", coord.flip = TRUE,
title = "Lead Aprons SW One-Piece Available at Institution by Birth Sex",
axis.titles = "Birth Sex",
legend.title= "Lead Aprons Std 1P?",
geom.colors = c("#006cc5","#cbcccb"),
show.summary = TRUE )+
set_theme(base= theme_classic())
plot_xtab(SURVEY$BIRTHSEX, SURVEY$LEAD_APRONS_STANDARD_TWOPIECE, margin = "row",
bar.pos = "stack", coord.flip = TRUE,
title = "Lead Aprons SW Two-Piece Available at Institution by Birth Sex",
axis.titles = "Birth Sex",
legend.title= "Lead Aprons Std 2P?",
geom.colors = c("#006cc5","#cbcccb"),
show.summary = TRUE )+
set_theme(base= theme_classic())
plot_xtab(SURVEY$BIRTHSEX, SURVEY$LEAD_APRONS_DOUBLE, margin = "row",
bar.pos = "stack", coord.flip = TRUE,
title = "Lead Aprons Double Lead (Maternity) Available at Institution by Birth Sex",
axis.titles = "Birth Sex",
legend.title= "Lead Aprons Double?",
geom.colors = c("#006cc5","#cbcccb"),
show.summary = TRUE )+
set_theme(base= theme_classic())
plot_xtab(SURVEY$BIRTHSEX, SURVEY$LEAD_APRONS_THYROID, margin = "row",
bar.pos = "stack", coord.flip = TRUE,
title = "Lead Aprons Thyroid Shield Available at Institution by Birth Sex",
axis.titles = "Birth Sex",
legend.title= "Lead Aprons Thyroid?",
geom.colors = c("#006cc5","#cbcccb"),
show.summary = TRUE )+
set_theme(base= theme_classic())
plot_xtab(SURVEY$BIRTHSEX, SURVEY$LEAD_APRONS_MATERNALDOS, margin = "row",
bar.pos = "stack", coord.flip = TRUE,
title = "Lead Aprons Maternal Dosimeter Available at Institution by Birth Sex",
axis.titles = "Birth Sex",
legend.title= "Lead Aprons Maternal?",
geom.colors = c("#006cc5","#cbcccb"),
show.summary = TRUE )+
set_theme(base= theme_classic())
plot_xtab(SURVEY$BIRTHSEX, SURVEY$LEAD_APRONS_FETALDOS, margin = "row",
bar.pos = "stack", coord.flip = TRUE,
title = "Lead Aprons Fetal Dosimeter Available at Institution by Birth Sex",
axis.titles = "Birth Sex",
legend.title= "Lead Aprons Fetal?",
geom.colors = c("#006cc5","#cbcccb"),
show.summary = TRUE )+
set_theme(base= theme_classic())
plot_xtab(SURVEY$BIRTHSEX, SURVEY$ERGO_FORMAL_TIMEOUT_PRIOR, margin = "row",
bar.pos = "stack", coord.flip = TRUE,
title = "Formal Ergo Timeouts at Institution by Birth Sex",
axis.titles = "Birth Sex",
legend.title= "Formal Ergo Timeout?",
geom.colors = c("#006cc5","#cbcccb"),
show.summary = TRUE )+
set_theme(base= theme_classic())
plot_xtab(SURVEY$BIRTHSEX, SURVEY$ERGO_INFORMAL_TIMEOUT_PRIOR, margin = "row",
bar.pos = "stack", coord.flip = TRUE,
title = "Informal Ergo Timeouts at Institution by Birth Sex",
axis.titles = "Birth Sex",
legend.title= "Informal Ergo Timeout?",
geom.colors = c("#006cc5","#cbcccb"),
show.summary = TRUE )+
set_theme(base= theme_classic())
plot_xtab( SURVEY$BIRTHSEX, SURVEY$MONITORS_ADJUSTABLE,margin = "row",
bar.pos = "stack", coord.flip = TRUE,
title = "Monitors Easily Adjustable at Institution by Birth Sex",
axis.titles = "Birth Sex",
legend.title= "Monitors Easily Adjust?",
geom.colors = c("#006cc5","#cbcccb"),
show.summary = TRUE )+
set_theme(base= theme_classic())
plot_xtab(SURVEY$BIRTHSEX, SURVEY$TEACHER_SENSITIVITY_STATURE_HANDSIZE, margin = "row",
bar.pos = "stack", coord.flip = TRUE,
title = "Teachers Train with Sensitivity to Stature/Hand Size by Birth Sex",
axis.titles = "Birth Sex",
legend.title= "Teacher Sensitivity to Stature?",
geom.colors = c("#006cc5","#cbcccb"),
show.summary = TRUE )+
set_theme(base= theme_classic())
plot_xtab(SURVEY$TEACHER_SENSITIVITY_BY_GENDER, SURVEY$BIRTHSEX, margin = "row",
bar.pos = "stack", coord.flip = TRUE,
title = "Sex of Sensitive Teachers by Birth Sex",
axis.titles = c('Male or Female Teachers More Sensitive?'),
legend.title= "Birth Sex",
geom.colors = c("#006cc5","#cbcccb"),
show.summary = TRUE )+
set_theme(base= theme_classic())
#Alternative View, if Birth Sex by Male or Female Teacher more Sensitive is desired
CrossTable(SURVEY$TEACHER_SENSITIVITY_BY_GENDER, SURVEY$BIRTHSEX, prop.chisq=F, prop.c=T, prop.r=F, prop.t=F, chisq=T, fisher=T) #rows then/over columns
##
##
## Cell Contents
## |-------------------------|
## | N |
## | N / Col Total |
## |-------------------------|
##
##
## Total Observations in Table: 198
##
##
## | SURVEY$BIRTHSEX
## SURVEY$TEACHER_SENSITIVITY_BY_GENDER | F | M | Row Total |
## -------------------------------------|-----------|-----------|-----------|
## Male | 6 | 7 | 13 |
## | 0.061 | 0.070 | |
## -------------------------------------|-----------|-----------|-----------|
## Female | 22 | 9 | 31 |
## | 0.224 | 0.090 | |
## -------------------------------------|-----------|-----------|-----------|
## Both Equally | 48 | 61 | 109 |
## | 0.490 | 0.610 | |
## -------------------------------------|-----------|-----------|-----------|
## Never had female teacher | 3 | 1 | 4 |
## | 0.031 | 0.010 | |
## -------------------------------------|-----------|-----------|-----------|
## Not Sure | 19 | 22 | 41 |
## | 0.194 | 0.220 | |
## -------------------------------------|-----------|-----------|-----------|
## Column Total | 98 | 100 | 198 |
## | 0.495 | 0.505 | |
## -------------------------------------|-----------|-----------|-----------|
##
##
## Statistics for All Table Factors
##
##
## Pearson's Chi-squared test
## ------------------------------------------------------------
## Chi^2 = 8.27915 d.f. = 4 p = 0.08187149
##
##
##
## Fisher's Exact Test for Count Data
## ------------------------------------------------------------
## Alternative hypothesis: two.sided
## p = 0.07371324
##
##
plot_xtab(SURVEY$BIRTHSEX, SURVEY$TACTILE_INSTRUCTION_FROM_MALES, margin = "row",
bar.pos = "stack", coord.flip = TRUE,
title = "Tactile Instruction from Male Teachers by Birth Sex",
axis.titles = "Birth Sex",
legend.title= "Tactile Instruction from Males?",
geom.colors = c("#006cc5","lightblue", "#cbcccb"),
show.summary = TRUE )+
set_theme(base= theme_classic())
plot_xtab(SURVEY$BIRTHSEX, SURVEY$TACTILE_INSTRUCTION_FROM_FEMALES, margin = "row",
bar.pos = "stack", coord.flip = TRUE,
title = "Tactile Instruction from Females Teachers by Birth Sex",
axis.titles = "Birth Sex",
legend.title= "Tactile Instruction from Females?",
geom.colors = c("#006cc5","lightblue", "#cbcccb"),
show.summary = TRUE )+
set_theme(base= theme_classic())
plot_xtab(SURVEY$BIRTHSEX, SURVEY$COMFORTABLE_ASKING_NURSES, margin = "row",
bar.pos = "stack", coord.flip = TRUE,
title = "Comfortable Asking Nurses for Help by Birth Sex",
axis.titles = "Birth Sex",
legend.title= "Comfortable Asking Nurses?",
geom.colors = c("#006cc5","#cbcccb"),
show.summary = TRUE )+
set_theme(base= theme_classic())
SUBSET <- sqldf( "select BIRTHSEX,
COMFORTABLE_ASKING_TECHS
from SURVEY
where COMFORTABLE_ASKING_TECHS != 'NA' ")
SUBSET <- SUBSET %>%
mutate(COMFORTABLE_ASKING_TECHS = recode_factor( COMFORTABLE_ASKING_TECHS, "N" = "N",
"Y" = "Y")) %>% droplevels()
plot_xtab(SUBSET$BIRTHSEX, SUBSET$COMFORTABLE_ASKING_TECHS, margin = "row",
bar.pos = "stack", coord.flip = TRUE,
title = "Comfortable Asking Techs for Help by Birth Sex (Includes only respondents with Techs)",
axis.titles = "Birth Sex",
legend.title= "Comfortable Asking Techs?",
geom.colors = c("#006cc5","#cbcccb"),
show.summary = TRUE )+
set_theme(base= theme_classic())
plot_xtab( SURVEY$BIRTHSEX, SURVEY$NURSES_ASKING, margin = "row",
bar.pos = "stack", coord.flip = TRUE,
title = "Times Asking Nurses for Help by Birth Sex",
axis.titles = "Birth Sex",
legend.title= "Times Asking Nurses?",
geom.colors = c("#006cc5", "lightblue", "#cbcccb"),
show.summary = TRUE )+
set_theme(base= theme_classic())
plot_xtab(SURVEY$BIRTHSEX, SURVEY$MALE_ATTENDINGS_ASKING, margin = "row",
bar.pos = "stack", coord.flip = TRUE,
title = "Times Male Attending Asking Nurses for Help by Birth Sex",
axis.titles = "Birth Sex",
legend.title= "Times Asking MaleAtt?",
geom.colors = c("#006cc5", "lightblue", "#cbcccb"),
show.summary = TRUE )+
set_theme(base= theme_classic())
plot_xtab(SURVEY$FEMALE_ATTENDINGS_ASKING, SURVEY$BIRTHSEX, margin = "row",
bar.pos = "stack", coord.flip = TRUE,
title = "Times Female Attending Asking Nurses for Help by Birth Sex",
axis.titles = c('Times Female Att Asking Nurses?'),
legend.title= "Birth Sex",
geom.colors = c("#006cc5","#cbcccb"),
show.summary = TRUE )+
set_theme(base= theme_classic())
#Alternative View, if Birth Sex by Times Asking Female Attending is desired
CrossTable(SURVEY$BIRTHSEX, SURVEY$FEMALE_ATTENDINGS_ASKING, prop.chisq=F, prop.c=F, prop.t=F, chisq=T, fisher=T) #rows then/over columns
##
##
## Cell Contents
## |-------------------------|
## | N |
## | N / Row Total |
## |-------------------------|
##
##
## Total Observations in Table: 193
##
##
## | SURVEY$FEMALE_ATTENDINGS_ASKING
## SURVEY$BIRTHSEX | Once | Twice | More than Twice | Don't work with FemAtt | Row Total |
## ----------------|------------------------|------------------------|------------------------|------------------------|------------------------|
## F | 37 | 23 | 31 | 3 | 94 |
## | 0.394 | 0.245 | 0.330 | 0.032 | 0.487 |
## ----------------|------------------------|------------------------|------------------------|------------------------|------------------------|
## M | 40 | 27 | 31 | 1 | 99 |
## | 0.404 | 0.273 | 0.313 | 0.010 | 0.513 |
## ----------------|------------------------|------------------------|------------------------|------------------------|------------------------|
## Column Total | 77 | 50 | 62 | 4 | 193 |
## ----------------|------------------------|------------------------|------------------------|------------------------|------------------------|
##
##
## Statistics for All Table Factors
##
##
## Pearson's Chi-squared test
## ------------------------------------------------------------
## Chi^2 = 1.308227 d.f. = 3 p = 0.7271803
##
##
##
## Fisher's Exact Test for Count Data
## ------------------------------------------------------------
## Alternative hypothesis: two.sided
## p = 0.7653168
##
##
plot_xtab(SURVEY$BIRTHSEX, SURVEY$RECOGNIZED_RESPECTED_ES_STAFF, margin = "row",
bar.pos = "stack", coord.flip = TRUE,
title = "Recognized/Respected by ES Staff by Birth Sex",
axis.titles = "Birth Sex",
legend.title= "Recog by ES Staff?",
geom.colors = c("#006cc5","#cbcccb"),
show.summary = TRUE )+
set_theme(base= theme_classic())
plot_xtab(SURVEY$BIRTHSEX, SURVEY$RECOGNIZED_RESPECTED_ANESTHETISTS, margin = "row",
bar.pos = "stack", coord.flip = TRUE,
title = "Recognized/Respected by Anesthetists by Birth Sex",
axis.titles = "Birth Sex",
legend.title= "Recog by Anesthetists?",
geom.colors = c("#006cc5","#cbcccb"),
show.summary = TRUE )+
set_theme(base= theme_classic())
plot_xtab( SURVEY$BIRTHSEX, SURVEY$RECOGNIZED_RESPECTED_GASTRO_ATTENDING,margin = "row",
bar.pos = "stack", coord.flip = TRUE,
title = "Recognized/Respected by Gastro Attending by Birth Sex",
axis.titles = "Birth Sex",
legend.title= "Recog by Gastro Att?",
<<<<<<< HEAD
geom.colors = c("#006cc5","#cbcccb"),
show.summary = TRUE )+
set_theme(base= theme_classic())
plot_xtab(SURVEY$BIRTHSEX, SURVEY$FIRST_NAME_NO_PERMISSION, margin = "row",
bar.pos = "stack", coord.flip = TRUE,
title = "First Name Used No Permission by Birth Sex",
axis.titles = "Birth Sex",
legend.title= "First Name No Permission?",
geom.colors = c("#006cc5","#cbcccb"),
show.summary = TRUE )+
set_theme(base= theme_classic())
=======
geom.colors = c("#006cc5","#cbcccb"),
show.summary = TRUE )+
set_theme(base= theme_classic())
plot_xtab(SURVEY$BIRTHSEX, SURVEY$FIRST_NAME_NO_PERMISSION, margin = "row",
bar.pos = "stack", coord.flip = TRUE,
title = "First Name Used No Permission by Birth Sex",
axis.titles = "Birth Sex",
legend.title= "First Name No Permission?",
geom.colors = c("#006cc5","#cbcccb"),
show.summary = TRUE )+
set_theme(base= theme_classic())
>>>>>>> cf5bd88abc0315e5e4934940adbca2f9401192aa
#Is there a race difference on this question ?
plot_xtab(SURVEY$RACE2, SURVEY$FIRST_NAME_NO_PERMISSION, margin = "row",
bar.pos = "stack", coord.flip = TRUE,
title = "First Name Used No Permission by Race (Broad)",
axis.titles = "Binary Race Category",
legend.title= "First Name Used No Permission?",
geom.colors = c("#006cc5","#cbcccb"),
show.summary = TRUE )+
set_theme(base= theme_classic())
plot_xtab(SURVEY$ERGO_TRAINING_MANDATORY, SURVEY$BIRTHSEX, margin = "row",
bar.pos = "stack", coord.flip = TRUE,
title = "Should Ergo Training be Mandaotry by Birth Sex",
axis.titles = c('Mandatory Ergo Training?'),
legend.title= "Birth Sex",
geom.colors = c("#006cc5","#cbcccb"),
show.summary = TRUE )+
set_theme(base= theme_classic())
#Alternative View, if Birth Sex by Ergo Training be Mandatory is desired
CrossTable(SURVEY$BIRTHSEX, SURVEY$ERGO_TRAINING_MANDATORY, prop.chisq=F, prop.c=F, prop.t=F, chisq=T, fisher=T) #rows then/over columns
##
##
## Cell Contents
## |-------------------------|
## | N |
## | N / Row Total |
## |-------------------------|
##
##
## Total Observations in Table: 198
##
##
## | SURVEY$ERGO_TRAINING_MANDATORY
## SURVEY$BIRTHSEX | Y | N | DK | Row Total |
## ----------------|-----------|-----------|-----------|-----------|
## F | 98 | 0 | 1 | 99 |
## | 0.990 | 0.000 | 0.010 | 0.500 |
## ----------------|-----------|-----------|-----------|-----------|
## M | 96 | 1 | 2 | 99 |
## | 0.970 | 0.010 | 0.020 | 0.500 |
## ----------------|-----------|-----------|-----------|-----------|
## Column Total | 194 | 1 | 3 | 198 |
## ----------------|-----------|-----------|-----------|-----------|
##
##
## Statistics for All Table Factors
##
##
## Pearson's Chi-squared test
## ------------------------------------------------------------
## Chi^2 = 1.353952 d.f. = 2 p = 0.5081513
##
##
##
## Fisher's Exact Test for Count Data
## ------------------------------------------------------------
## Alternative hypothesis: two.sided
## p = 0.6211636
##
##
plot_xtab(SURVEY$ERGO_OPTIMIZAITON_BUDGET_REQUIRED, SURVEY$BIRTHSEX, margin = "row",
bar.pos = "stack", coord.flip = TRUE,
title = "Should Budget Include Ergo Optimiation by Birth Sex",
axis.titles = c('Budget Should Include Ergo Opti?'),
legend.title= "Birth Sex",
geom.colors = c("#006cc5","#cbcccb"),
show.summary = TRUE )+
set_theme(base= theme_classic())
#Alternative View, if Birth Sex by Ergo Optimization Budget be Mandatory is desired
CrossTable(SURVEY$BIRTHSEX, SURVEY$ERGO_OPTIMIZAITON_BUDGET_REQUIRED, prop.chisq=F, prop.c=F, prop.t=F, chisq=T, fisher=T) #rows then/over columns
##
##
## Cell Contents
## |-------------------------|
## | N |
## | N / Row Total |
## |-------------------------|
##
##
## Total Observations in Table: 198
##
##
## | SURVEY$ERGO_OPTIMIZAITON_BUDGET_REQUIRED
## SURVEY$BIRTHSEX | Y | N | DK | Row Total |
## ----------------|-----------|-----------|-----------|-----------|
## F | 95 | 0 | 4 | 99 |
## | 0.960 | 0.000 | 0.040 | 0.500 |
## ----------------|-----------|-----------|-----------|-----------|
## M | 89 | 3 | 7 | 99 |
## | 0.899 | 0.030 | 0.071 | 0.500 |
## ----------------|-----------|-----------|-----------|-----------|
## Column Total | 184 | 3 | 11 | 198 |
## ----------------|-----------|-----------|-----------|-----------|
##
##
## Statistics for All Table Factors
##
##
## Pearson's Chi-squared test
## ------------------------------------------------------------
## Chi^2 = 4.013834 d.f. = 2 p = 0.1344024
##
##
##
## Fisher's Exact Test for Count Data
## ------------------------------------------------------------
## Alternative hypothesis: two.sided
## p = 0.1342971
##
##
plot_xtab(SURVEY$BIRTHSEX, SURVEY$EXPERIENCE_IMPROVED_DIAL_EXTENDERS, margin = "row",
bar.pos = "stack", coord.flip = TRUE,
title = "Increased Availability of Dial Extenders by Birth Sex",
axis.titles = "Birth Sex",
legend.title= "Increase Avail Dial Ext?",
geom.colors = c("#006cc5","lightblue", "#cbcccb"),
show.summary = TRUE )+
set_theme(base= theme_classic())
plot_xtab(SURVEY$BIRTHSEX, SURVEY$EXPERIENCE_IMPROVED_PEDI_COLONOSCOPES, margin = "row",
bar.pos = "stack", coord.flip = TRUE,
title = "Increased Availability of Pedi Colonoscopes by Birth Sex",
axis.titles = "Birth Sex",
legend.title= "Increase Avail Pediscopes?",
geom.colors = c("#006cc5","lightblue", "#cbcccb"),
show.summary = TRUE )+
set_theme(base= theme_classic())
plot_xtab(SURVEY$BIRTHSEX, SURVEY$EXPERIENCE_IMPROVED_APRONS, margin = "row",
bar.pos = "stack", coord.flip = TRUE,
title = "Increased Availability of Lead Aprons by Birth Sex",
axis.titles = "Birth Sex",
legend.title= "Improve Aprons?",
geom.colors = c("#006cc5","lightblue", "#cbcccb"),
show.summary = TRUE )+
set_theme(base= theme_classic())
plot_xtab(SURVEY$ENDO_TEACHERS_FORMAL_TRAINING_REQUIRED, SURVEY$BIRTHSEX, margin = "row",
bar.pos = "stack", coord.flip = TRUE,
title = "Formal Ergo Training Required for Teachers by Birth Sex",
axis.titles = c('Ergo Training Required for Teachers?'),
legend.title= "Birth Sex",
geom.colors = c("#006cc5","#cbcccb"),
show.summary = TRUE )+
set_theme(base= theme_classic())
#Alternative View, if Birth Sex by Ergo Optimization Budget be Mandatory is desired
CrossTable(SURVEY$BIRTHSEX, SURVEY$ENDO_TEACHERS_FORMAL_TRAINING_REQUIRED, prop.chisq=F, prop.c=F, prop.t=F, chisq=T, fisher=T) #rows then/over columns
##
##
## Cell Contents
## |-------------------------|
## | N |
## | N / Row Total |
## |-------------------------|
##
##
## Total Observations in Table: 198
##
##
## | SURVEY$ENDO_TEACHERS_FORMAL_TRAINING_REQUIRED
## SURVEY$BIRTHSEX | Y | N | DK | Row Total |
## ----------------|-----------|-----------|-----------|-----------|
## F | 90 | 1 | 8 | 99 |
## | 0.909 | 0.010 | 0.081 | 0.500 |
## ----------------|-----------|-----------|-----------|-----------|
## M | 91 | 3 | 5 | 99 |
## | 0.919 | 0.030 | 0.051 | 0.500 |
## ----------------|-----------|-----------|-----------|-----------|
## Column Total | 181 | 4 | 13 | 198 |
## ----------------|-----------|-----------|-----------|-----------|
##
##
## Statistics for All Table Factors
##
##
## Pearson's Chi-squared test
## ------------------------------------------------------------
## Chi^2 = 1.697833 d.f. = 2 p = 0.4278784
##
##
##
## Fisher's Exact Test for Count Data
## ------------------------------------------------------------
## Alternative hypothesis: two.sided
## p = 0.4998525
##
##
plot_xtab(SURVEY$BIRTHSEX, SURVEY$ERGONOMIC_IMPORTANCE, margin = "row",
bar.pos = "stack", coord.flip = TRUE,
title = "Importance of Ergonomics in Relation to ERI",
axis.titles = "Birth Sex",
legend.title= "Ergo Importance Response",
geom.colors = c("#006cc5","#cbcccb"),
show.summary = TRUE )+
set_theme(base= theme_classic())
plot_xtab(SURVEY$BIRTHSEX, SURVEY$MITIGATING_MUSCLE_STRAIN, margin = "row",
bar.pos = "stack", coord.flip = TRUE,
title = "Mitigation Strategies to Reduce Muscle Strain Risk",
axis.titles = "Birth Sex",
legend.title= "Muscle Strain Response",
geom.colors = c("#006cc5","#cbcccb"),
show.summary = TRUE )+
set_theme(base= theme_classic())
plot_xtab(SURVEY$BIRTHSEX, SURVEY$BED_POSITION, margin = "row",
bar.pos = "stack", coord.flip = TRUE,
title = "Bed Position in Relation to the Elbow",
axis.titles = "Birth Sex",
legend.title= "Bed Position Response",
geom.colors = c("#006cc5","#cbcccb"),
show.summary = TRUE )+
set_theme(base= theme_classic())
plot_xtab(SURVEY$BIRTHSEX, SURVEY$ENDO_TRAINER_POSITION, margin = "row",
bar.pos = "stack", coord.flip = TRUE,
title = "Best Position for Endoscopy Trainer",
axis.titles = "Birth Sex",
legend.title= "Trainer Position Response",
geom.colors = c("#006cc5","#cbcccb"),
show.summary = TRUE )+
set_theme(base= theme_classic())
plot_xtab(SURVEY$BIRTHSEX, SURVEY$WHEN_DISABILITY_INSURANCE, margin = "row",
bar.pos = "stack", coord.flip = TRUE,
title = "Best Time to Explore Disability Insurance",
axis.titles = "Birth Sex",
legend.title= "When Disab Ins Response",
geom.colors = c("#006cc5","#cbcccb"),
show.summary = TRUE )+
set_theme(base= theme_classic())
CORRECT <-
SURVEY %>%
mutate(CORRECT = across(.cols = ERGONOMIC_IMPORTANCE: WHEN_DISABILITY_INSURANCE , .fns = str_count, "Correct")) %>%
rowwise() %>%
mutate(COUNT_CORRECT = across(.cols = contains("CORRECT"), .fns = sum)) %>%
select (BIRTHSEX, ERGONOMIC_IMPORTANCE: WHEN_DISABILITY_INSURANCE, COUNT_CORRECT) %>%
mutate( COUNT_CORRECT = as.integer(COUNT_CORRECT) )
eov.ttest(CORRECT, COUNT_CORRECT, BIRTHSEX)
## [1] "F Test p.value = 0.5842159 EOV = TRUE (Pooled)"
## [1] "CORRECT : COUNT_CORRECT ~ BIRTHSEX"
##
## Two Sample t-test
##
## data: CORRECT : COUNT_CORRECT ~ BIRTHSEX
## t = 0.47387, df = 193, p-value = 0.6361
## alternative hypothesis: true difference in means between group F and group M is not equal to 0
## 95 percent confidence interval:
## -0.2458321 0.4013128
## sample estimates:
## mean in group F mean in group M
## 3.459184 3.381443
ggbetweenstats( data= CORRECT,
x = BIRTHSEX,
y = COUNT_CORRECT,
type="parametric",
p.adjust.method = "none",
title = "Mean Scores by Birth Sex")